﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Browser;

namespace WorkFlow.WFDesigner
{
    public partial class MainPage : UserControl
    {
        public bool stateBool = false;
        public MainPage()
        {
            InitializeComponent();

            this.hideclick.Click += new RoutedEventHandler(hideclick_Click);

            DateTime expir = DateTime.UtcNow + TimeSpan.FromDays(7);

            String cookie = String.Format("{0}={1};expires={2}",
            "dfadsfadfa",
            "司法ad事发地发",
            expir.ToString("R"));

            HtmlPage.Document.SetProperty("cookie", cookie);
            MessageBox.Show(cookie);
        }

        private void hideclick_Click(object sender, RoutedEventArgs e)
        {
            //if (this.left.Visibility == Visibility.Visible)
            //{
            //    this.left.Visibility = Visibility.Collapsed;
            //    this.content.ColumnDefinitions[0].Width = GridLength.Auto;
            //}
            //else
            //{
            //    this.left.Visibility = Visibility.Visible;
            //    this.content.ColumnDefinitions.First().Width = new GridLength(200);
            //}
            this.stateBool = !this.stateBool;
            //MessageBox.Show(stateBool.ToString());
            //pointboard.Begin();
            if (this.stateBool)
            {
                this.HiddenMenu.Begin();
                
            }
            else
            {
                this.ShowMenu.Begin();
                
            }
        }
    }
}
